package ace.cmp.core.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caspar
 * @date 2023/4/14 15:45
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PageDto {

  @Builder.Default
  private Integer size = 10;
  @Builder.Default
  private Integer page = 0;

  public static PageDto of(int page, int size) {
    return PageDto.builder().page(page).size(size).build();
  }
}
